var e = getApp();

Page({
    data: {
        deliver_id: ""
    },
    onLoad: function(e) {
        if (e.scene) {
            var n = decodeURIComponent(e.scene);
            if (n) {
                var t = [];
                t = n.split(",");
                for (var i = 0; i < t.length; i++) {
                    var a;
                    "id" == (a = t[i].split("="))[0] && this.setData({
                        deliver_id: a[1]
                    });
                }
            }
        }
        e.id && this.setData({
            deliver_id: e.id
        }), this.getData();
    },
    getData: function() {
        var n = e.getNetAddresss("plugin.package-deliver.frontend.deliver-share.index");
        e._postNetWork({
            url: n,
            data: {
                deliver_id: this.data.deliver_id
            },
            success: function(e) {
                var n = e.data;
                1 == n.result ? n.data.mini_share_url ? wx.reLaunch({
                    url: n.data.mini_share_url
                }) : wx.reLaunch({
                    url: "/packageG/index/index"
                }) : wx.showToast({
                    title: n.msg,
                    duration: 1e3,
                    icon: "none"
                });
            }
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});